home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
CRS
/
crs08.d81
/
xref.prg
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2009-10-10
|
10KB
|
336 lines
10 REM*********************************
20 REM** XREF **
30 REM** (C) 1985 BY DAVID ARCHIBALD **
40 REM** (313) 736-0239 **
50 REM*********************************
60 REM
70 REM
80 REM
90 PRINT"[147]":PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT
100 PRINTSPC(8)"POKING XREF INTO MEMORY.":PRINT
110 PRINTSPC(6)"PLEASE WAIT APPROX. TWO MIN."
120 REM
130 REM-- SAVE BORDER COLOR.
140 REM
150 M1=53280:LT=15:P4=1
160 BC=PEEK(M1)
170 REM
180 REM-- GET TOP OF FREE MEMORY AND
190 REM-- WHERE TO PUT START OF PROG.
200 REM
210 EA=PEEK(55)+PEEK(56)*256-1:SA=EA-214:EXE=SA
220 REM
230 REM-- CHECK IF START OF XREF IS
240 REM-- LOWER THEN END OF BASIC PROG.
250 REM
260 BM=PEEK(45)+PEEK(46)*256+100
270 IF BM>SA THEN PRINT:PRINT"THERE ISN'T ENOUGH FREE MEMORY":END
280 REM
290 REM-- CONVERT START OF XREF INTO
300 REM-- SPLIT DECIMAL.
310 REM
320 TH=INT(SA/256):TL=SA-TH*256
330 FOR PA=SA TO EA
340 READ BY:TST=BY-INT(BY)
350 REM
360 REM-- RANDOMLY CHANGE BORDER COLOR.
370 REM
380 CM=CM+P4:IFCM=20 THEN P1=RND(1)*LT+P4:POKEM1,P1:CM=0
390 REM
400 REM-- IF BYTE FOLLOWED BY .1 THEN
410 REM-- LOWER BYTE OF ABSOLUTE ADD.
420 REM-- ADD LOWER BYTE OF START TO IT
430 REM-- SO IT POINTS TO RELOCATED ADD.
440 REM
450 IF TST>0 AND TST<.2 THEN CARRY=0:BY=BY+TL
460 REM
470 REM-- IF LOWER BYTE IS GREATER THEN
480 REM-- 255 THEN A CARRY IS GENERATED
490 REM-- SO ADD 1 TO HIGH BYTE.
500 REM
510 IF BY>255.5 THEN BY=BY-256:CARRY=1
520 REM
530 REM-- IF BYTE FOLLOWED BY .2 THEN
540 REM-- HIGH BYTE OF ABSOLUTE ADD.
550 REM
560 IF TST>.19 THEN BY=BY+TH+CARRY:CARRY=0
570 POKE PA,BY
580 NEXT PA
590 REM
600 REM
610 REM-- STARTING ADDR ($A000) & ENDING
620 REM-- ADDR ($A71E) OF MAIN PROGRAM
630 REM-- UNDER BASIC'S ROM.
640 REM
650 IF A=0 THEN A=1:SA=40960:EA=42781:GOTO 330
660 POKEM1,BC
670 SYS EXE:NEW
680 REM
690 REM
700 REM-- RELOCATABLE SECTION OF THE
710 REM-- PROGRAM IS NOT POKED UNDER
720 REM-- BASIC'S ROM.
730 REM
740 REM
750 DATA 32,31.1,0.2,76,234,166,70
760 DATA 69,82,0,80,76,69,160,0,132
770 DATA 122,177,122,164,32,166,33
780 DATA 201,58,176,3,76,128,0,96
790 DATA 120,165,1,41,254,208,5,88
800 DATA 165,1,9,1,133,1,96,72,32,38.1
810 DATA 0.2,104,32,210,255,76,31.1
820 DATA 0.2,32,38.1,0.2,169,4,32,195
830 DATA 255,32,204,255,108,2,3,32
840 DATA 38.1,0.2,76,167,166,32,38.1
850 DATA 0.2,32,228,255,72,32,31.1,0.2
860 DATA 104,96,132,32,134,33,166
870 DATA 157,16,178,166,122,208,174
880 DATA 201,88,240,10,160,3,162,9.1
890 DATA 201,72,240,6,208,160,160,2
900 DATA 162,6.1,142,126.1,0.2,32,115
910 DATA 0,217,6.1,0.2,208,139,136,16
920 DATA 245,173,126.1,0.2,201,6.1,240
930 DATA 6,32,31.1,0.2,76,14,161,169
940 DATA 163,133,26,32,115,0,201,0
950 DATA 208,6,32,31.1,0.2,76,40,161
960 DATA 72,169,4,32,195,255,104
970 DATA 162,3,160,36,201,42,208,7
980 DATA 32,115,0,162,4,160,76,140
990 DATA 166,162,72,169,4,160,255,32
1000 DATA 186,255,169,0,32,189,255,32
1010 DATA 192,255,162,4,32,201,255,32
1020 DATA 31.1,0.2,76,0,160
1030 REM
1040 REM
1050 REM-- START OF MAIN PROGRAM
1060 REM-- UNDER BASIC'S ROM.
1070 REM
1080 DATA 166,43,232,232,228,45
1090 DATA 208,9,166,44,228,46,208,3
1100 DATA 76,20,167,32,95,163,104
1110 DATA 160,0,132,75,230,76,201,64
1120 DATA 208,11,230,75,132,76,32,115
1130 DATA 0,201,0,240,11,153,197
1140 DATA 163,153,203,163,200,192,5
1150 DATA 208,238,140,196,163,140,202
1160 DATA 163,152,240,6,169,0,133,75
1170 DATA 240,11,162,11,189,9,164,157
1180 DATA 196,163,202,16,247,166,43
1190 DATA 202,134,32,165,44,133,33
1200 DATA 169,0,141,91,161,230,30,133
1210 DATA 2,141,193,162,169,29,133
1220 DATA 251,169,167,133,252,173,197
1230 DATA 163,201,58,176,8,238,91,161
1240 DATA 169,0,141,187,160,32,4,162
1250 DATA 166,2,240,3,76,71,162,162,0
1260 DATA 201,143,240,10,201,131,240
1270 DATA 6,201,34,208,18,162,34
1280 DATA 142,160,160,32,4,162,201,0
1290 DATA 240,223,201,0,208,245,240
1300 DATA 217,174,91,161,240,40,201
1310 DATA 138,240,20,201,137,240,16
1320 DATA 201,141,240,12,201,167,240
1330 DATA 8,162,0,240,189,201,44
1340 DATA 208,180,141,187,160,32,4
1350 DATA 162,201,58,176,170,201,48
1360 DATA 144,166,176,8,201,65,144
1370 DATA 165,201,91,176,161,169,202
1380 DATA 133,25,32,75,161,240,37,166
1390 DATA 76,208,148,144,5,141,193
1400 DATA 162,176,141,169,196,133,25
1410 DATA 32,145,161,144,20,240,18
1420 DATA 169,202,133,25,32,185,161
1430 DATA 169,29,133,251,169,167,133
1440 DATA 252,32,201,161,76,123,160
1450 DATA 169,164,141,23,161,160,0
1460 DATA 185,21,164,240,11,32,210
1470 DATA 255,200,208,245,238,23,161
1480 DATA 208,240,76,20,167,32,84,163
1490 DATA 240,27,32,8,163,240,14,160
1500 DATA 0,177,253,133,20,200,177
1510 DATA 253,133,21,76,23,167,169,29
1520 DATA 133,251,169,167,133,252,76
1530 DATA 0,163,165,32,133,27,165
1540 DATA 33,133,28,169,1,133,29,32
1550 DATA 4,162,162,0,208,24,201,91
1560 DATA 176,32,201,65,176,24,201,36
1570 DATA 240,8,201,37,240,4,201,40
1580 DATA 208,4,230,29,208,12,201,58
1590 DATA 176,8,201,48,144,4,230,29
1600 DATA 208,213,165,30,208,11,56
1610 DATA 165,32,233,1,133,32,176,2
1620 DATA 198,33,173,91,161,240,5,32
1630 DATA 178,161,208,29,160,0,177,25
1640 DATA 197,29,144,2,165,29,170,240
1650 DATA 10,177,27,200,209,25,208,9
1660 DATA 202,208,246,160,0,165,29
1670 DATA 209,25,96,160,0,165,29,145
1680 DATA 25,170,177,27,200,145,25
1690 DATA 202,208,248,96,32,84,163
1700 DATA 240,24,160,0,177,251,197,20
1710 DATA 208,16,200,177,251,197,21
1720 DATA 208,9,200,169,1,24,113,251
1730 DATA 145,251,96,24,165,251,105,3
1740 DATA 133,251,165,252,105,0,133
1750 DATA 252,160,0,165,20,145,251
1760 DATA 200,165,21,145,251,200,169
1770 DATA 1,145,251,96,169,1,141,35
1780 DATA 162,165,30,240,18,198,30
1790 DATA 160,3,177,32,133,20,200,177
1800 DATA 32,133,21,169,5,141,35,162
1810 DATA 24,165,32,105,1,133,32,165
1820 DATA 33,105,0,133,33,160,0,177
1830 DATA 32,240,5,201,32,240,206,96
1840 DATA 200,209,32,240,3,230,30,96
1850 DATA 200,209,32,208,248,230,2,96
1860 DATA 32,84,163,240,116,32,230
1870 DATA 161,169,13,32,17,167,174
1880 DATA 202,163,160,1,185,202,163
1890 DATA 32,17,167,200,202,208,246
1900 DATA 32,32,163,169,32,133,253
1910 DATA 169,167,133,254,160,0,177
1920 DATA 253,141,174,163,200,177,253
1930 DATA 141,175,163,200,177,253,72
1940 DATA 32,108,163,104,141,174,163
1950 DATA 201,1,240,18,238,168,162
1960 DATA 169,47,157,176,163,232,169
1970 DATA 0,141,175,163,168,32,120
1980 DATA 163,169,32,157,176,163,232
1990 DATA 238,168,162,169,0,201,0,176
2000 DATA 10,169,13,32,17,167,160,1
2010 DATA 32,32,163,32,51,163,32,64
2020 DATA 163,32,8,163,208,174,169,0
2030 DATA 240,26,174,202,163,189,202
2040 DATA 163,157,196,163,202,16,247
2050 DATA 162,5,189,15,164,157,202
2060 DATA 163,202,16,247,76,79,160
2070 DATA 165,75,240,22,198,75,32,95
2080 DATA 163,169,64,141,197,163,169
2090 DATA 1,141,196,163,162,2,76
2100 DATA 208,162,104,104,169,29,133
2110 DATA 253,169,167,133,254,160,40
2120 DATA 32,97,163,76,20,167,24,165
2130 DATA 253,105,3,133,253,165,254
2140 DATA 105,0,133,254,165,251,197
2150 DATA 253,208,4,165,252,197,254
2160 DATA 96,138,72,169,32,32,17,167
2170 DATA 232,200,192,11,208,245,142
2180 DATA 168,162,104,170,96,160,0
2190 DATA 185,176,163,32,17,167,200
2200 DATA 202,208,246,96,32,26,167
2210 DATA 201,80,208,6,32,26,167,170
2220 DATA 240,250,201,3,208,13,76,246
2230 DATA 162,169,29,197,251,208,4
2240 DATA 169,167,197,252,96,160,0
2250 DATA 185,208,163,240,248,32,17
2260 DATA 167,200,208,245,160,10,162
2270 DATA 0,169,48,153,175,163,136
2280 DATA 208,248,142,153,163,56,173
2290 DATA 174,163,249,186,163,72,173
2300 DATA 175,163,249,187,163,144,12
2310 DATA 141,175,163,104,141,174,163
2320 DATA 254,176,163,176,228,104,224
2330 DATA 0,208,7,189,176,163,201
2340 DATA 48,240,4,232,238,168,162
2350 DATA 200,200,192,10,208,206,96,0
2360 DATA 0,48,48,48,48,48,48,48,48
2370 DATA 48,48,16,39,232,3,100,0,10
2380 DATA 0,1,0,78,85,77,66,69,82
2390 DATA 78,85,77,66,69,82,13,13,18
2400 DATA 86,65,82,47,78,85,77,32,45
2410 DATA 32,65,80,80,69,65,82,83,32
2420 DATA 79,78,32,76,73,78,69,32,78
2430 DATA 85,77,66,69,82,40,83,41,13
2440 DATA 0,13,13,18,69,78,68,32,79
2450 DATA 70,32,84,69,88,84,13,13,0
2460 DATA 1,48,32,32,32,32,5,90,90
2470 DATA 90,90,90,147,32,32,32,32
2480 DATA 32,32,32,32,32,32,32,32,32
2490 DATA 32,18,88,82,69,70,54,52,32
2500 DATA 72,69,76,80,13,13,34,88,34
2510 DATA 32,67,65,78,32,69,81,85,65
2520 DATA 76,32,65,32,86,65,82,73,65
2530 DATA 66,76,69,32,85,80,32,84,79
2540 DATA 32,70,73,86,69,13,76,69,84
2550 DATA 84,69,82,83,32,76,79,78,71
2560 DATA 44,32,79,82,32,65,32,78,85
2570 DATA 77,66,69,82,32,66,69,84,87
2580 DATA 69,69,78,13,48,45,54,53,53
2590 DATA 51,53,46,13,13,18,34,88,82
2600 DATA 69,70,64,32,60,67,82,62,34
2610 DATA 146,32,58,80,82,73,78,84,83
2620 DATA 32,65,76,76,32,82,69,70,69
2630 DATA 82,69,78,67,69,83,46,13,18
2640 DATA 34,88,82,69,70,42,64,32,60
2650 DATA 67,82,62,34,146,32,58,80
2660 DATA 82,73,78,84,83,32,65,76,76
2670 DATA 32,82,69,70,69,82,69,78,67
2680 DATA 69,83,32,84,79,13,89,79,85
2690 DATA 82,32,80,82,73,78,84,69,82
2700 DATA 46,13,18,34,88,82,69,70,64
2710 DATA 32,88,32,60,67,82,62,34
2720 DATA 146,32,58,80,82,73,78,84,83
2730 DATA 32,65,76,76,32,82,69,70,69
2740 DATA 82,69,78,67,69,83,44,13,70
2750 DATA 82,79,77,32,34,88,34,32,79
2760 DATA 78,46,13,18,34,88,82,69,70
2770 DATA 42,64,32,88,32,60,67,82,62
2780 DATA 34,146,32,58,83,65,77,69
2790 DATA 32,65,83,32,65,66,79,86,69
2800 DATA 44,32,66,85,84,32,84,72,69
2810 DATA 13,79,85,84,80,85,84,32,73
2820 DATA 83,32,83,69,78,84,32,84,79
2830 DATA 32,89,79,85,82,32,80,82,73
2840 DATA 78,84,69,82,46,13,18,34,88
2850 DATA 82,69,70,32,88,34,32,79,82
2860 DATA 32,34,88,82,69,70,42,32,88
2870 DATA 34,146,32,58,80,82,73,78
2880 DATA 84,83,32,84,79,32,84,72,69
2890 DATA 13,83,67,82,69,69,78,32,79
2900 DATA 82,32,89,79,85,82,32,80,82
2910 DATA 73,78,84,69,82,32,65,76,76
2920 DATA 32,82,69,70,69,82,69,78,67
2930 DATA 69,83,13,84,79,32,34,88,34
2940 DATA 46,13,18,34,88,82,69,70,32
2950 DATA 60,67,82,62,34,146,32,58
2960 DATA 67,79,78,83,69,67,85,84,73
2970 DATA 86,69,76,89,32,76,73,83,84
2980 DATA 83,32,79,78,69,13,66,65,83
2990 DATA 73,67,32,76,73,78,69,44,32
3000 DATA 87,72,69,82,69,32,34,88,34
3010 DATA 32,65,80,80,69,65,82,83,46
3020 DATA 13,13,80,82,69,83,83,32,84
3030 DATA 72,69,32,34,80,34,32,75,69
3040 DATA 89,32,84,79,32,80,65,85,83
3050 DATA 69,32,84,72,69,13,76,73,83
3060 DATA 84,73,78,71,44,32,65,78,68
3070 DATA 32,65,78,89,32,75,69,89,32
3080 DATA 84,79,32,67,79,78,84,73,78
3090 DATA 85,69,46,13,80,82,69,83,83
3100 DATA 32,82,85,78,47,83,84,79,80
3110 DATA 44,32,84,79,32,67,65,78,67
3120 DATA 69,76,32,84,72,69,32,76,73
3130 DATA 83,84,73,78,71,46,13,13,0
3140 DATA 147,13,32,32,32,32,32,32,32
3150 DATA 32,32,32,32,32,32,32,32,32
3160 DATA 18,88,82,69,70,54,52,13,13
3170 DATA 13,32,32,32,32,32,32,32,32
3180 DATA 65,32,86,65,82,73,65,66,76
3190 DATA 69,32,38,32,76,73,78,69,32
3200 DATA 78,85,77,66,69,82,13,32,32
3210 DATA 32,32,32,32,32,32,67,82,79
3220 DATA 83,83,32,82,69,70,69,82,69
3230 DATA 78,67,69,32,80,82,79,71,82
3240 DATA 65,77,13,13,32,32,32,32,32
3250 DATA 32,18,40,67,41,32,49,57,56
3260 DATA 53,32,66,89,32,68,65,86,73
3270 DATA 68,32,65,82,67,72,73,66,65
3280 DATA 76,68,13,13,0,162,6.1,160
3290 DATA 0.2,134,55,132,56,169,76
3300 DATA 162,89.1,160,0.2,133,124,134
3310 DATA 125,132,126,160,0,185,103
3320 DATA 166,240,9,32,17,167,200,208
3330 DATA 245,76,31.1,0.2,76,38.1,0.2
3340 DATA 76,46.1,0.2,76,57.1,0.2
3350 DATA 76,71.1,0.2,76,77.1,0.2,0